package tack15;

import javax.swing.*;

/**
 * 菜单界面
 */
public class MenuPanel extends JPanel {
    //存款
    private ImageIcon saveImg = new ImageIcon("atmlogo/buttonSave.jpg");
    //取款
    private ImageIcon saveImg1 = new ImageIcon("atmlogo/buttonGet.jpg");
    //查询
    private ImageIcon saveImg2 = new ImageIcon("atmlogo/buttonFind.jpg");
    //转账
    private ImageIcon saveImg3 = new ImageIcon("atmlogo/pane.jpg");
    //改密
    private ImageIcon saveImg4 = new ImageIcon("atmlogo/buttonModify.jpg");
    //退出
    private ImageIcon saveImg5 = new ImageIcon("atmlogo/buttonOff.jpg");


    private JButton saveBtn = new JButton(saveImg);
    private JButton saveBtn1 = new JButton(saveImg1);
    private JButton saveBtn2 = new JButton(saveImg2);
    private JButton saveBtn3 = new JButton(saveImg3);
    private JButton saveBtn4 = new JButton(saveImg4);
    private JButton saveBtn5 = new JButton(saveImg5);



    public MenuPanel(){
        //空布局
        this.setLayout(null);
        //位置坐标
        saveBtn.setBounds(0,210,140,50);
        saveBtn1.setBounds(0,310,140,50);
        saveBtn2.setBounds(0,410,140,50);
        saveBtn3.setBounds(0,510,140,50);
        saveBtn4.setBounds(870,210,140,50);
        saveBtn5.setBounds(870,310,140,50);


        //添加实现
        this.add(saveBtn);
        this.add(saveBtn1);
        this.add(saveBtn2);
        this.add(saveBtn3);
        this.add(saveBtn4);
        this.add(saveBtn5);

        //投影只用写一个
        this.setOpaque(false);
    }
}
